package collectionTest;

import com.google.common.collect.Maps;

import java.util.Collections;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 * User: liuliwei
 * Date: 2017-10-09
 * Time: 下午2:31
 * Description: unmodifiableMap 不可以被编辑的map
 */
public class MapTest {
    public static void main(String[] args) {
        Map<String, String> test = Maps.newHashMap();
        test = Collections.unmodifiableMap(test);
        test.put("3", "3");
    }
}
